﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CMSModel;

public partial class menu : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
        }
    }
    public List<Power> Lst
    {
        get
        {
            CMSModel.CMSEntities dal = DAL.DBManager.GetCmsEmtity();
            string loginname = Server.HtmlEncode(Request.Cookies["loginname"].Value);
            int roleid = dal.User.First(x => x.LoginName.Contains(loginname)).Role.RoleId;
            return dal.Role_Power.Where(x => x.RoleId == roleid).Select(x=>x.Power).ToList();
        }
    }


}
